/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.goods.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.xcxAdmin.entity.ZtAdmin;

/**
 * 测试数据Entity
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Table(name = "zt_order", alias = "a", columns = {
		@Column(name = "id", attrName = "id", label = "编号", isPK = true),
		@Column(name = "order", attrName = "order", label = "订单号", queryType = QueryType.LIKE),
		@Column(name = "addr", attrName = "addr", label = "地址", queryType = QueryType.EQ),
		@Column(name = "phone", attrName = "phone", label = "手机号码"),
		
		@Column(name = "name", attrName = "name", label = "收货人"),
		@Column(name = "detailaddr", attrName = "detailaddr", label = "收货人"),
		@Column(name = "province", attrName = "province", label = "收货人"),
		@Column(name = "city", attrName = "city", label = "收货人"),
		@Column(name = "county", attrName = "county", label = "收货人"),
		@Column(name = "town", attrName = "town", label = "收货人"),
		@Column(name = "townbid", attrName = "townbid", label = "收货人"),
		@Column(name = "countybid", attrName = "countybid", label = "收货人"),
		@Column(name = "provincebid", attrName = "provincebid", label = "收货人"),
		@Column(name = "citybid", attrName = "citybid", label = "收货人"),
		@Column(name = "freight", attrName = "freight", label = "运费"),
		
		@Column(name = "logistics", attrName = "logistics", label = "物流单号"),
		@Column(name = "logistics_name", attrName = "logisticsName", label = "物流公司名"),
		@Column(name = "logistics_code", attrName = "logisticsCode", label = "物流公司代号"),
		@Column(name = "order_time", attrName = "orderTime", label = "下单时间"),
		@Column(name = "pay_time", attrName = "payTime", label = "支付时间", isUpdate = true),
		@Column(name = "orig_price", attrName = "origPrice", label = "商品总价"),
		@Column(name = "create_date", attrName = "createDate", label = "创建时间"),
		@Column(name = "quanself_id", attrName = "quanselfid", label = "我的优惠券id"),
		
		@Column(name = "balance", attrName = "balance", label = "余额"),
		@Column(name = "total_price", attrName = "totalPrice", label = "总计价钱"),
		
		@Column(name = "remaining_time", attrName = "remainingTime", label = "剩余时间"),
		@Column(name = "status", attrName = "status", label = "状态"),
		@Column(name = "trolleyid", attrName = "trolleyid", label = "购物车id"),
		@Column(name = "orderstatus", attrName = "orderstatus", label = "订单状态0待付款 1待发货（已付款）"),
		
		@Column(name = "admin_id", attrName = "ztAdmin.id", label = "小程序用户id"),
		@Column(name = "goods", attrName = "goods", label = "商品或物品信息"),		

		 }, joinTable={
					@JoinTable(type=Type.LEFT_JOIN, entity=ZtAdmin.class, attrName="ztAdmin", alias="u10",
							on="u10.id = a.admin_id", columns={
								@Column(name="name", label="小程序用户名",  queryType = QueryType.LIKE),
								@Column(name="headimgurl", label="小程序头像",attrName = "headimgurl"),
								@Column(name="id", label="id",attrName = "id"),
						})
					
					},orderBy = "a.create_date DESC")
public class ZtOrder extends DataEntity<ZtOrder>{

	private static final long serialVersionUID = 1L;
	
	private String order,addr,phone,name,logistics,logisticsName,status,orderstatus,trolleyid;

	private Date orderTime,payTime,remainingTime;
	private Double origPrice;//商品总价
	private Double totalPrice;//合计价格
	private Double balance;//余额
	private ZtAdmin ztAdmin;
	private String quanselfid;
	private Double freight;
	private String goods;
	private String logisticsCode;
	
	private String province;
	private String city;
	private String county;
	private String detailaddr;
	private String town;
	private Integer townbid;
	private Integer countybid;
	private Integer provincebid;
	private Integer citybid;
	
	private Long timestap;//时间戳
	
	@JsonIgnore
	private Date createDate;
	@JsonIgnore
	private String updateBy;
	@JsonIgnore
	private String createBy;
	@JsonIgnore
	private Date updateDate;
	
	private Integer pageNum;
	
	public Long getTimestap() {
		return timestap;
	}
	public void setTimestap(Long timestap) {
		this.timestap = timestap;
	}
	public String getTown() {
		return town;
	}
	public void setTown(String town) {
		this.town = town;
	}
	public Integer getTownbid() {
		return townbid;
	}
	public void setTownbid(Integer townbid) {
		this.townbid = townbid;
	}
	public Integer getCountybid() {
		return countybid;
	}
	public void setCountybid(Integer countybid) {
		this.countybid = countybid;
	}
	public Integer getProvincebid() {
		return provincebid;
	}
	public void setProvincebid(Integer provincebid) {
		this.provincebid = provincebid;
	}
	public Integer getCitybid() {
		return citybid;
	}
	public void setCitybid(Integer citybid) {
		this.citybid = citybid;
	}
	public String getDetailaddr() {
		return detailaddr;
	}
	public void setDetailaddr(String detailaddr) {
		this.detailaddr = detailaddr;
	}
	public Double getFreight() {
		return freight;
	}
	public void setFreight(Double freight) {
		this.freight = freight;
	}
	
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getCounty() {
		return county;
	}
	public void setCounty(String county) {
		this.county = county;
	}
	public Double getBalance() {
		return balance;
	}
	public void setBalance(Double balance) {
		this.balance = balance;
	}
	@JsonIgnore
	public String getTrolleyid() {
		return trolleyid;
	}
	public void setTrolleyid(String trolleyid) {
		this.trolleyid = trolleyid;
	}
	
	public String getLogisticsCode() {
		return logisticsCode;
	}
	public void setLogisticsCode(String logisticsCode) {
		this.logisticsCode = logisticsCode;
	}
	private List<ZtQuan> ztQuanselfList=new ArrayList<ZtQuan>();
	private List<ZtGoods> ztGoodsList=new ArrayList<ZtGoods>();
	
	@JsonIgnore
	public Integer getPageNum() {
		return pageNum;
	}
	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}
	
	public List<ZtQuan> getZtQuanselfList() {
		return ztQuanselfList;
	}
	public void setZtQuanselfList(List<ZtQuan> ztQuanselfList) {
		this.ztQuanselfList = ztQuanselfList;
	}
	public List<ZtGoods> getZtGoodsList() {
		return ztGoodsList;
	}
	public void setZtGoodsList(List<ZtGoods> ztGoodsList) {
		this.ztGoodsList = ztGoodsList;
	}
	public String getOrderstatus() {
		return orderstatus;
	}
	public void setOrderstatus(String orderstatus) {
		this.orderstatus = orderstatus;
	}
	public String getOrder() {
		return order;
	}
	public void setOrder(String order) {
		this.order = order;
	}
	public String getAddr() {
		return addr;
	}
	public void setAddr(String addr) {
		this.addr = addr;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getLogistics() {
		return logistics;
	}
	public void setLogistics(String logistics) {
		this.logistics = logistics;
	}
	public String getLogisticsName() {
		return logisticsName;
	}
	public void setLogisticsName(String logisticsName) {
		this.logisticsName = logisticsName;
	}
	
	@JsonIgnore
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getOrderTime() {
		return orderTime;
	}
	public void setOrderTime(Date orderTime) {
		this.orderTime = orderTime;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getPayTime() {
		return payTime;
	}
	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getRemainingTime() {
		return remainingTime;
	}
	public void setRemainingTime(Date remainingTime) {
		this.remainingTime = remainingTime;
	}
	public Double getOrigPrice() {
		return origPrice;
	}
	public void setOrigPrice(Double origPrice) {
		this.origPrice = origPrice;
	}
	public Double getTotalPrice() {
		return totalPrice;
	}
	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}
	
	public ZtAdmin getZtAdmin() {
		return ztAdmin;
	}
	public void setZtAdmin(ZtAdmin ztAdmin) {
		this.ztAdmin = ztAdmin;
	}
	
	public String getQuanselfid() {
		return quanselfid;
	}
	public void setQuanselfid(String quanselfid) {
		this.quanselfid = quanselfid;
	}
	
	public String getGoods() {
		return goods;
	}
	public void setGoods(String goods) {
		this.goods = goods;
	}
	
	
	
}